org.eclipse.vtp.framework.interactions.voice.vxml
Class Filled

java.lang.Object
  extended by org.eclipse.vtp.framework.interactions.core.support.Widget
      extended by org.eclipse.vtp.framework.interactions.voice.vxml.Filled
All Implemented Interfaces:
VXMLConstants

public class Filled
extends Widget
implements VXMLConstants

The Filled class represents the <filled> VXML element. It defines a list of actions to be performed by the VXML interpreter when data has been collected from the caller. Both Field and Form instances can contain Filled elements. An optional list of names can be defined to specify which elements this filled element is interested in. The mode determines which elements of the name list must be filled before the actions are performed. Setting the mode to Filled.MODE_ANY allows the execution of the filled element when data is collected for any of the named elements, where as, Filled.MODE_ALL only allows execution of the filled element when data has been collected for all of the named elements. The default mode is Filled.MODE_ANY. If no list of named elements is provided, the list defaults to all elements within the current scope. NOTE: If a filled element is added to a field whose name is not contained within the name list (only if a name list is explicitly defined), the filled element will never execute.

Version:
2.0
Author:
Trip Gilman, Lonnie Pryor

Field Summary
 
Fields inherited from interface org.eclipse.vtp.framework.interactions.voice.vxml.VXMLConstants
EMPTY, FILE_EXT_GSL, FILLED_MODE_ALL, FILLED_MODE_ANY, GRAMMAR_MODE_DTMF, GRAMMAR_MODE_VOICE, METHOD_GET, METHOD_POST, MIME_TYPE_GSL, MIME_TYPE_SRGS, NAME_APPLICATION, NAME_ASSIGN, NAME_AUDIO, NAME_BARGEIN, NAME_BEEP, NAME_BLOCK, NAME_BRIDGE, NAME_CATCH, NAME_CHOICE, NAME_COMPLETETIMEOUT, NAME_COND, NAME_CONFIDENCELEVEL, NAME_COUNT, NAME_DEST, NAME_DISCONNECT, NAME_DTMF, NAME_DTMFTERM, NAME_ELSE, NAME_ELSEIF, NAME_ENCTYPE, NAME_ENUMERATE, NAME_ERROR, NAME_EVENT, NAME_EVENTEXPR, NAME_EXIT, NAME_EXPR, NAME_FIELD, NAME_FILLED, NAME_FINALSILENCE, NAME_FORM, NAME_GOTO, NAME_GRAMMAR, NAME_ID, NAME_IF, NAME_INCOMPLETETIMEOUT, NAME_INPUTMODES, NAME_INTERDIGITTIMEOUT, NAME_ITEM, NAME_MAXNBEST, NAME_MAXSPEECHTIMEOUT, NAME_MAXTIME, NAME_MENU, NAME_METHOD, NAME_MODE, NAME_NAME, NAME_NAMELIST, NAME_NEXT, NAME_NOINPUT, NAME_NOMATCH, NAME_ONE_OF, NAME_OPTION, NAME_PARAM, NAME_PROMPT, NAME_PROPERTY, NAME_RECORD, NAME_REPEAT, NAME_REPROMPT, NAME_RETURN, NAME_ROOT, NAME_RULE, NAME_SCOPE, NAME_SCRIPT, NAME_SENSITIVITY, NAME_SPEEDVSACCURACY, NAME_SRC, NAME_SUBDIALOG, NAME_SUBMIT, NAME_TERMCHAR, NAME_TERMTIMEOUT, NAME_THROW, NAME_TIMEOUT, NAME_TRANSFER, NAME_TYPE, NAME_VALUE, NAME_VAR, NAME_VERSION, NAME_VXML, NAMESPACE_URI_VXML, QNAME_XML_LANG, SCOPE_DIALOG, SCOPE_DOCUMENT, TYPE_CDATA, VERSION_2_0
 
Constructor Summary
Filled()
          Creates a new instance of Filled that will execute if any of the elements in the current scope are filled.
Filled(java.lang.String mode)
          Creates a new instance of Filled that will execute based on the specified mode when the elements in the current scope are filled.
Filled.FILLED_MODE_ANY - When any elements are filled Filled.FILLED_MODE_ALL - When all elements are filled
Filled(java.lang.String[] names)
          Creates a new instance of Filled that will execute if any of the elements named in the array are filled.
Filled(java.lang.String mode, java.lang.String[] names)
          Creates a new instance of Filled that will execute based on the specified mode when the elements named in the array are filled.
Filled.FILLED_MODE_ANY - When any elements are filled Filled.FILLED_MODE_ALL - When all elements are filled
 
Method Summary
 void addAction(Action action)
          Adds the action to the list of actions to perform if this filled element is executed.
 void addIfClause(If ifClause)
          Adds a set of conditional actions into the list of actions to perform if this filled element is executed.
 void addName(java.lang.String name)
          Adds the name to the list of element names.
 void addVariable(Variable variable)
          Adds the specified variable element to this filled handler.
 Widget[] getActionsAndIfClauses()
          Returns the actions and conditionals that this filled executes.
 java.lang.String getMode()
          Returns the setting that determines which elements need to be filled.
 java.lang.String[] getNames()
          Returns the element names this filled instance requires.
 Variable[] getVariables()
          Returns the variables set when this filled executes.
 void removeAction(Action action)
          Removes the action from the list of actions to perform if this filled element is executed.
 void removeIfClause(If ifClause)
          Removes a set of conditional actions from the list of actions to perform if this filled element is executed.
 void removeName(java.lang.String name)
          Removes the name from the list of element names.
 void removeVariable(Variable variable)
          Removes the specified variable element from this filled handler.
 void setMode(java.lang.String mode)
          Sets the setting that determines which elements need to be filled.
Filled.FILLED_MODE_ANY - When any elements are filled Filled.FILLED_MODE_ALL - When all elements are filled
protected  void writeActionsAndIfClauses(org.xml.sax.ContentHandler outputHandler)
          Write the actions and if clauses of this filled to the specified content handler.
protected  void writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
          Write the attribute members of this filled to the supplied set.
protected  void writeVariables(org.xml.sax.ContentHandler outputHandler)
          Write the variables in this filled to the specified content handler.
 void writeWidget(org.xml.sax.ContentHandler outputHandler)
          Writes the content of this widget to an XML content handler.
 
Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Filled

public Filled()
Creates a new instance of Filled that will execute if any of the elements in the current scope are filled.


Filled

public Filled(java.lang.String mode)
       throws java.lang.IllegalArgumentException,
              java.lang.NullPointerException
Creates a new instance of Filled that will execute based on the specified mode when the elements in the current scope are filled.

Parameters:
mode - The setting that determines which elements need to be filled.
Throws:
java.lang.IllegalArgumentException - If the specified mode is not one of "any" or "all".
java.lang.NullPointerException

Filled

public Filled(java.lang.String[] names)
       throws java.lang.IllegalArgumentException,
              java.lang.NullPointerException
Creates a new instance of Filled that will execute if any of the elements named in the array are filled.

Parameters:
names - An array of element names.
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException

Filled

public Filled(java.lang.String mode,
              java.lang.String[] names)
       throws java.lang.IllegalArgumentException,
              java.lang.NullPointerException
Creates a new instance of Filled that will execute based on the specified mode when the elements named in the array are filled.

Parameters:
mode - The setting that determines which elements need to be filled.
names - An array of element names.
Throws:
java.lang.IllegalArgumentException - If the specified mode is not one of "any" or "all".
java.lang.NullPointerException
Method Detail

getMode

public java.lang.String getMode()
Returns the setting that determines which elements need to be filled.

Returns:
The setting that determines which elements need to be filled.

getNames

public java.lang.String[] getNames()
Returns the element names this filled instance requires.

Returns:
The element names this filled instance requires.

getVariables

public Variable[] getVariables()
Returns the variables set when this filled executes.

Returns:
The variables set when this filled executes.

getActionsAndIfClauses

public Widget[] getActionsAndIfClauses()
Returns the actions and conditionals that this filled executes.

Returns:
The actions and conditionals that this filled executes.

setMode

public void setMode(java.lang.String mode)
             throws java.lang.IllegalArgumentException,
                    java.lang.NullPointerException
Sets the setting that determines which elements need to be filled.

Parameters:
mode - The setting that determines which elements need to be filled.
Throws:
java.lang.IllegalArgumentException - If the specified mode is not one of "any" or "all".
java.lang.NullPointerException

addName

public void addName(java.lang.String name)
             throws java.lang.IllegalArgumentException,
                    java.lang.NullPointerException
Adds the name to the list of element names.

Parameters:
name - The element name to add.
Throws:
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.NullPointerException - If the specified name is null.

removeName

public void removeName(java.lang.String name)
                throws java.lang.IllegalArgumentException,
                       java.lang.NullPointerException
Removes the name from the list of element names.

Parameters:
name - The element name to remove.
Throws:
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.NullPointerException - If the specified name is null.

addVariable

public void addVariable(Variable variable)
                 throws java.lang.NullPointerException
Adds the specified variable element to this filled handler. Variables declared at the filled level are accessible to only its child elements.

Parameters:
variable - The variable to add.
Throws:
java.lang.NullPointerException - If the specified variable is null.

removeVariable

public void removeVariable(Variable variable)
                    throws java.lang.NullPointerException
Removes the specified variable element from this filled handler. Variables declared at the filled level are accessible to only its child elements.

Parameters:
variable - The variable to remove.
Throws:
java.lang.NullPointerException - If the specified variable is null.

addAction

public void addAction(Action action)
               throws java.lang.NullPointerException
Adds the action to the list of actions to perform if this filled element is executed.

Parameters:
action - The action to add.
Throws:
java.lang.NullPointerException - If the specified action is null.

removeAction

public void removeAction(Action action)
                  throws java.lang.NullPointerException
Removes the action from the list of actions to perform if this filled element is executed.

Parameters:
action - The action to remove.
Throws:
java.lang.NullPointerException - If the specified action is null.

addIfClause

public void addIfClause(If ifClause)
                 throws java.lang.NullPointerException
Adds a set of conditional actions into the list of actions to perform if this filled element is executed.

Parameters:
ifClause - The If clause to add.
Throws:
java.lang.NullPointerException - If the specified if clause is null.

removeIfClause

public void removeIfClause(If ifClause)
                    throws java.lang.NullPointerException
Removes a set of conditional actions from the list of actions to perform if this filled element is executed.

Parameters:
ifClause - The If clause to remove.
Throws:
java.lang.NullPointerException - If the specified if clause is null.

writeWidget

public void writeWidget(org.xml.sax.ContentHandler outputHandler)
                 throws java.lang.NullPointerException,
                        org.xml.sax.SAXException
Description copied from class: Widget
Writes the content of this widget to an XML content handler.

Specified by:
writeWidget in class Widget
Parameters:
outputHandler - The handler to write this widget to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of this widget fails.

writeAttributes

protected void writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
Write the attribute members of this filled to the supplied set.

Parameters:
attributes - The attribute set to write to.
Throws:
java.lang.NullPointerException - If the supplied attribute set is null.

writeVariables

protected void writeVariables(org.xml.sax.ContentHandler outputHandler)
                       throws java.lang.NullPointerException,
                              org.xml.sax.SAXException
Write the variables in this filled to the specified content handler.

Parameters:
outputHandler - The content handler to write to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of one of the variables fails.

writeActionsAndIfClauses

protected void writeActionsAndIfClauses(org.xml.sax.ContentHandler outputHandler)
                                 throws java.lang.NullPointerException,
                                        org.xml.sax.SAXException
Write the actions and if clauses of this filled to the specified content handler.

Parameters:
outputHandler - The content handler to write to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of one of the actions or if clauses fails.